import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)


export const constantRouterMap = [
  {
    path: '/user/login',
    name: 'login',
    component: () => import('@/pages/system/login/Login')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/pages/system/login/Login')
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/pages/exception/404')
  },
  {
    path: '/403',
    name: '403',
    component: () => import('@/pages/exception/403')
  },
  {
    path: '/500',
    name: '500',
    component: () => import('@/pages/exception/500')
  },
  {
    path: '/loginError',
    name: 'loginError',
    component: () => import('@/pages/exception/loginError')
  }
]

export default new Router({
  mode: 'history', // 去掉url中的#
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRouterMap
})
